<?php
namespace app\admin\controller;
use \think\Controller;
use \think\Db;
class Course extends Controller
{
			public function index(){
			   	//获取视频类型
			   	$types=Db::name("type")->select();
			   	$this->assign("types",$types);
			   	//调用模型层，实现获取用户列表数据的功能
			   	//$videos=Db::name("videos")->select();
			   	//多表连接
			   	$courses=Db::query('select * from courses c,type t where c.type_id=t.type_id order by c.type_id desc');
			   	$this->assign("clist",$courses);
			   	return $this->fetch();
			}
}